import { findGold,buyGold,getCode} from '../../http/orders.js'
export default ({
	namespaced:true,
	state:{
		billLists:[]
	},
	mutations:{
		renderGoldId(state,data){
			state.billLists=data;
		}
	},
	actions:{
	async findGoldbyId(context,data){
			const result=await findGold(data);
			console.log(result);
			if(result.code){
				context.commit("renderGoldId",result.data.list);
				console.log(result.data.list)
			}
			
		},
		// 购买黄金数量
	    async buyGold(state,data) {
            console.log(data,'data');
            return await buyGold(data)
             
			 },
			//  获取短信验证
			 async getCode(state,data) {
				console.log(data,'data');
				return await getCode(data)
				 
				 }, 

	}
})